package com.yan.demo.arrydemo;

import java.util.Arrays;

public class ArrayDemo2 {
    public static void main(String[] args) {
        int[] arr = new int[]{1, 2, 3, 4, 5, 6};
        int length = arr.length;
        System.out.println(length);
        System.out.println(arr[2]);
        arr[2] = 33;
        System.out.println("arr = " + Arrays.toString(arr));
        System.out.println(arr[arr.length - 1]);
        System.out.println(arr.length - 1);
    }
}
